<template>
  <div>
    <div class="my-body">
      <div class="ipt_a">
        <div style="float: left; line-height: 30px" class="tab_font-size">
          授权方：
        </div>
        <el-input
          v-model="shouquanfang"
          placeholder="请输入内容"
          style="width: 150px; height: 50px; float: left"
        ></el-input>
      </div>
      <div class="ipt_a">
        <div style="float: left; line-height: 30px" class="tab_font-size">
          经销商：
        </div>
        <el-input
          v-model="jxshang"
          placeholder="请输入内容"
          style="width: 150px; height: 50px; float: left"
        ></el-input>
      </div>
      <div class="ipt_a">
        <div style="float: left; line-height: 30px" class="tab_font-size">
          终止日期：
        </div>
        <div>
          <el-date-picker
            v-model="sqendate"
            type="date"
            placeholder="选择日期"
            style="width: 150px; float: left"
          >
          </el-date-picker>
        </div>
      </div>
      <div class="ipt_a">
        <div style="float: left; line-height: 30px" class="tab_font-size">
          医院地区：
        </div>
        <el-input
          v-model="hospitalname"
          placeholder="请输入内容"
          style="width: 150px; height: 50px; float: left"
        ></el-input>
      </div>

      <div class="ipt_a">
        <div style="float: left; line-height: 30px" class="tab_font-size">
          授权状态：
        </div>
        <el-select
          v-model="sousstatus"
          placeholder="请选择授权状态"
          style="width: 150px; float: left"
        >
          <el-option
            :value="item.id"
            v-for="item in sousuolist"
            :key="item.id"
            :label="item.title"
          >
          </el-option>
        </el-select>
      </div>

      <el-button type="primary" plain @click="jinxiaoshanglist()"
        >查询</el-button
      >
      <el-button>清空</el-button>

      <div style="width: 100%; float: left">
        <div>
          <el-button
            type="primary"
            size="small"
            icon="el-icon-plus"
            @click="xinzeng()"
            plain
            >新增</el-button
          >
          <el-button type="primary" @click="areabgbtn" plain>变更</el-button>
          <el-button type="danger" size="small" icon="el-icon-delete" plain
            >删除</el-button
          >
          <el-button type="warning" plain>作废</el-button>
        </div>
        <!-- 授权变更 -->
        <el-dialog
          title="变更"
          :visible.sync="areabg"
          width="30%"
          :before-close="handleClose"
        >
          <div style="width: 100%">
            <el-form ref="form" :model="form" label-width="150px">
              <!-- <el-form-item label="授权申请编号">
                  <el-input
                    v-model="bgform.name"
                    style="width: 200px"
                  ></el-input>
                  <el-button type="primary">刷新</el-button>
                </el-form-item> -->
              <el-form-item label="申请时间">
                <el-date-picker
                  v-model="bgform.create_time"
                  type="datetime"
                  placeholder="选择日期时间"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="授权起始年月">
                <el-date-picker
                  v-model="bgform.sq_start_date"
                  type="date"
                  placeholder="选择日期"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="授权终止年月">
                <el-date-picker
                  v-model="bgform.sq_end_date"
                  type="date"
                  placeholder="选择日期"
                  disabled
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="授权年限">
                <el-select
                  v-model="bgform.sq_year_num"
                  placeholder="请选择授权年限"
                  disabled
                >
                  <el-option
                    v-for="item in sq_company_year"
                    :key="item.id"
                    :label="item.title"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="经销商">
                <el-input
                  v-model="bgform.jxs_code"
                  style="width: 100px"
                ></el-input>

                <el-select
                  v-model="bgform.jingxiaoshangkust"
                  placeholder="请选择经销商"
                  style="width: 200px"
                  value-key="id"
                  @change="changedjbg"
                >
                  <el-option
                    v-for="(item, index) in company_list"
                    :key="index"
                    :label="item.name"
                    :value="item"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="授权方">
                <el-input
                  v-model="bgform.sqf_code"
                  style="width: 100px"
                  :disabled="disabledis"
                ></el-input>

                <el-select
                  v-model="bgform.shouquanfkust"
                  placeholder="请选择授权方"
                  style="width: 200px"
                  value-key="id"
                  :disabled="disabledis"
                  @change="changesqbg"
                >
                  <el-option
                    v-for="item in company_list"
                    :key="item"
                    :label="item.name"
                    :value="item"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="配送方">
                <el-input
                  v-model="bgform.psf_code"
                  style="width: 100px"
                  :disabled="disabledis"
                ></el-input>

                <el-select
                  v-model="bgform.peisongfangkust"
                  placeholder="请选择配送方"
                  style="width: 200px"
                  value-key="id"
                  :disabled="disabledis"
                  @change="changepsfbg"
                >
                  <el-option
                    v-for="item in company_list"
                    :key="item"
                    :label="item.name"
                    :value="item"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>

              <el-form-item>
                <!-- <el-checkbox-group v-model="form.type"  @change="handleCheckedCitiesChange">
		          <el-checkbox
		            label="经销商,授权方,配送方三方统一"
		            name="type"
		          ></el-checkbox>
		        </el-checkbox-group> -->
                <el-checkbox
                  v-model="checked"
                  @change="handleCheckedCitiesChange"
                  >经销商,授权方,配送方三方统一</el-checkbox
                >
              </el-form-item>

              <el-form-item label="授权医院" v-if="bgform.sq_type == '1'">
                <el-input
                  v-model="bgform.hospital_id"
                  style="width: 50px"
                ></el-input>

                <el-select
                  v-model="bgform.yiyuankust"
                  placeholder="请选择授权医院"
                  style="width: 200px"
                  value-key="id"
                  disabled
                  @change="changepyiy"
                >
                  <el-option
                    v-for="item in hospital_list"
                    :key="item.id"
                    :label="item.hospital_name"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="授权地区" v-if="bgform.sq_type == '2'">
                <el-input
                  v-model="bgform.area_id"
                  style="width: 50px"
                ></el-input>

                <el-select
                  v-model="bgform.area_id"
                  placeholder="请选择授权地区"
                  value-key="id"
                  style="width: 200px"
                >
                  <el-option
                    v-for="item in areaslist"
                    :key="item.id"
                    :label="item.area_name"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="产品系列">
                <el-select
                  v-model="bgform.productids"
                  disabled
                  placeholder="请选择产品系列"
                  style="width: 200px"
                  multiple
                  @change="handleSelectChange"
                >
                  <el-option
                    v-for="item in product_type"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
                <div>{{ bgform.product_names }}</div>
                <!-- <el-checkbox
		          :indeterminate="isIndeterminate"
		          v-model="checkAlla"
		          @change="handleCheckAllChange"
		          >全选</el-checkbox
		        > -->
              </el-form-item>
              <!-- <el-form-item label="产品类型">
		        <div style="margin: 15px 0"></div>
		        <el-checkbox-group
		          v-model="checkedCities"
		          @change="handleChange"
		        >
		          <el-checkbox
		            v-for="city in listtyp"
		            :label="city.id"
		            :key="city.id"
		            >{{ city.name }}</el-checkbox
		          >
		        </el-checkbox-group>
		      </el-form-item> -->
              <el-form-item label="授权原因">
                <el-select
                  v-model="bgform.reason_id"
                  placeholder="请选择授权原因"
                  style="width: 200px"
                >
                  <el-option
                    v-for="item in sq_company_reason"
                    :key="item.id"
                    :label="item.title"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
                合同商业采购指标(实时段内际付款)：<el-input
                  style="width: 50px; height: 40px"
                  placeholder="0"
                  v-model="bgform.sc_target_num"
                ></el-input
                >套 普实先心商采指标
                <el-input
                  style="width: 50px; height: 40px"
                  placeholder="0"
                  v-model="bgform.zr_target_num"
                ></el-input
                >植入指标
              </el-form-item>
              <el-form-item label="备注">
                <el-input type="textarea" v-model="bgform.remark"></el-input>
              </el-form-item>
              <el-form-item label="变更交接">
                <el-select
                  v-model="exchange_info"
                  placeholder="请选择变更交接"
                  style="width: 200px"
                  multiple
                  @change="jinhuoe"
                >
                  <el-option
                    v-for="item in exchange_option"
                    :key="item.id"
                    :label="item.title"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="onSubmitbiangeng"
                  >变更申请</el-button
                >
                <el-button @click="quxiaosqbg()">取消</el-button>
              </el-form-item>
            </el-form>
          </div>
        </el-dialog>

        <!-- 授权申请 -->

        <el-dialog
          :title="shenqing"
          :visible.sync="area"
          width="30%"
          :before-close="handleClose"
        >
          <div style="width: 100%">
            <el-form ref="form" :model="form" label-width="150px">
              <!-- <el-form-item label="授权申请编号">
                  <el-input v-model="form.name" style="width: 200px"></el-input>
                  <el-button type="primary">刷新</el-button>
                </el-form-item> -->

              <el-form-item label="授权起始年月">
                <el-date-picker
                  v-model="form.sq_start_date"
                  type="date"
                  placeholder="选择日期"
                  format="yyyy-MM-dd"
                  value-format="yyyy-MM-dd"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="授权终止年月">
                <el-date-picker
                  v-model="form.sq_end_date"
                  type="date"
                  placeholder="选择日期"
                  format="yyyy-MM-dd"
                  value-format="yyyy-MM-dd"
                  disabled
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="授权年限">
                <el-select
                  v-model="form.sq_year_num"
                  placeholder="请选择授权年限"
                  @change="change"
                >
                  <el-option
                    v-for="item in sq_company_year"
                    :key="item.id"
                    :label="item.title"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="经销商">
                <el-input
                  v-model="form.jxs_code"
                  style="width: 70px"
                ></el-input>

                <el-select
                  v-model="jingxiaoshangkust"
                  placeholder="请选择经销商"
                  style="width: 200px"
                  value-key="id"
                  @change="changedj"
                >
                  <el-option
                    v-for="(item, index) in company_list"
                    :key="index"
                    :label="item.name"
                    :value="item"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="授权方">
                <el-input
                  v-model="form.sqf_code"
                  style="width: 70px"
                  :disabled="disabledis"
                ></el-input>

                <el-select
                  v-model="shouquanfkust"
                  placeholder="请选择授权方"
                  style="width: 200px"
                  value-key="id"
                  :disabled="disabledis"
                  @change="changesq"
                >
                  <el-option
                    v-for="item in company_list"
                    :key="item"
                    :label="item.name"
                    :value="item"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="配送方">
                <el-input
                  v-model="form.psf_code"
                  style="width: 70px"
                  :disabled="disabledis"
                ></el-input>

                <el-select
                  v-model="peisongfangkust"
                  placeholder="请选择配送方"
                  style="width: 200px"
                  value-key="id"
                  :disabled="disabledis"
                  @change="changepsf"
                >
                  <el-option
                    v-for="item in company_list"
                    :key="item"
                    :label="item.name"
                    :value="item"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>

              <el-form-item>
                <el-checkbox
                  v-model="checked"
                  @change="handleCheckedCitiesChange"
                  >经销商,授权方,配送方三方统一</el-checkbox
                >
              </el-form-item>

              <el-form-item>
                <el-radio-group v-model="radio">
                  <el-radio label="1">授权医院</el-radio>
                  <el-radio label="2">授权地址</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="授权医院" v-if="radio == '1'">
                <el-input
                  v-model="form.hospital_code"
                  style="width: 70px"
                ></el-input>

                <el-select
                  v-model="yiyuankust"
                  placeholder="请选择授权医院"
                  style="width: 200px"
                  value-key="id"
                  @change="changepyiy"
                >
                  <el-option
                    v-for="item in hospital_list"
                    :key="item"
                    :label="item.hospital_name"
                    :value="item"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="授权地区" v-if="radio == '2'">
                <el-input
                  v-model="form.area_code"
                  style="width: 70px"
                ></el-input>

                <el-select
                  v-model="dizhikust"
                  placeholder="请选择授权地区"
                  style="width: 200px"
                  value-key="id"
                  @change="changedhz"
                >
                  <el-option
                    v-for="item in areaslist"
                    :key="item"
                    :label="item.area_name"
                    :value="item"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="产品系列">
                <el-select
                  v-model="form.productids"
                  placeholder="请选择产品系列"
                  style="width: 200px"
                  multiple
                  value-key="id"
                  @change="handleSelectChange"
                >
                  <el-option
                    v-for="item in product_type"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
                <!-- <el-checkbox
                  :indeterminate="isIndeterminate"
                  v-model="checkAlla"
                  @change="handleCheckAllChange"
                  >全选</el-checkbox
                > -->
              </el-form-item>
              <el-form-item label="产品类型">
                <div style="margin: 15px 0"></div>
                <el-checkbox-group
                  v-model="checkedCities"
                  @change="handleChange"
                >
                  <el-checkbox
                    v-for="city in listtyp"
                    :label="city.id"
                    :key="city.id"
                    >{{ city.name }}</el-checkbox
                  >
                </el-checkbox-group>
              </el-form-item>
              <el-form-item label="授权原因">
                <el-select
                  v-model="form.reason_id"
                  placeholder="请选择授权原因"
                  style="width: 200px"
                >
                  <el-option
                    v-for="item in sq_company_reason"
                    :key="item.id"
                    :label="item.title"
                    :value="item.id"
                    :disabled="item.disabled"
                  >
                  </el-option>
                </el-select>
                合同商业采购指标(实时段内际付款)：<el-input
                  style="width: 50px; height: 40px"
                  placeholder="0"
                  v-model="form.sc_target_num"
                ></el-input
                >套 普实先心商采指标
                <el-input
                  style="width: 50px; height: 40px"
                  placeholder="0"
                  v-model="form.zr_target_num"
                ></el-input
                >植入指标
              </el-form-item>
              <el-form-item label="备注">
                <el-input type="textarea" v-model="form.remark"></el-input>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="onSubmitshouquan"
                  >申请</el-button
                >
                <el-button @click="quxiaosq()">取消</el-button>
              </el-form-item>
            </el-form>
          </div>
        </el-dialog>
        <el-dialog
          title="日志信息"
          :visible.sync="rizhixinxi"
          width="40%"
          :before-close="handleClose"
        >
          <template>
            <el-table :data="xinxilist" stripe style="width: 100%" height="400">
              <el-table-column
                prop="operation_type"
                label="操作类型"
                width="180"
              >
              </el-table-column>
              <el-table-column prop="result_txt" label="状态" width="180">
              </el-table-column>
              <el-table-column prop="admin_name" label="操作人">
              </el-table-column>
              <el-table-column prop="create_time" label="操作时间">
              </el-table-column>
              <el-table-column prop="remark" label="备注信息">
              </el-table-column>
            </el-table>
          </template>
        </el-dialog>
        <template>
          <el-table
            :data="tableData"
            border
            style="width: 100%; margin-top: 30px"
            highlight-current-row
            ref="singleTable"
            @current-change="handleCurrentChange"
            :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
            height="400"
          >
            <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
            <el-table-column
              fixed
              prop="empower_code"
              label="授权证书编号"
              width="150"
            >
            </el-table-column>
            <el-table-column prop="apply_type_txt" label="申请类型" width="120">
            </el-table-column>
            <el-table-column prop="create_time" label="申请时间" width="120">
            </el-table-column>
            <el-table-column
              prop="sq_start_date"
              label="授权起始日期"
              width="120"
            >
            </el-table-column>
            <el-table-column
              prop="sq_end_date"
              label="授权终止日期"
              width="120"
            >
            </el-table-column>
            <el-table-column prop="product_names" label="授权产品" width="200">
            </el-table-column>
            <el-table-column prop="status_txt" label="授权状态" width="200">
            </el-table-column>
            <el-table-column
              prop="hospital_area_name"
              label="授权医院"
              width="200"
            >
            </el-table-column>
            <el-table-column prop="sqf_name" label="授权方" width="200">
            </el-table-column>
            <el-table-column prop="jxs_name" label="经销商" width="200">
            </el-table-column>
            <el-table-column prop="psf_name" label="配送方" width="200">
            </el-table-column>
            <el-table-column prop="reson_txt" label="授权原因" width="200">
            </el-table-column>
            <el-table-column prop="peisonf" label="其他授权原因" width="200">
            </el-table-column>
            <el-table-column prop="sc_target_num" label="商采指标" width="200">
            </el-table-column>

            <el-table-column prop="peisonf" label="授权证书" width="200">
            </el-table-column>
            <el-table-column prop="remark" label="备注" width="200">
            </el-table-column>
            <el-table-column label="操作日志" width="200" fixed="right">
              <template slot-scope="scope">
                <el-button
                  size="mini"
                  type="text"
                  @click="handleEditbj(scope.$index, scope.row)"
                >
                  <i class="el-icon-edit"></i>编辑
                </el-button>
                <el-button
                  size="mini"
                  type="text"
                  @click="handleEdit(scope.$index, scope.row)"
                >
                  <i class="el-icon-setting"></i>审核日志
                </el-button>
              </template>
            </el-table-column>
          </el-table>
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChangelist"
            :current-page="currentPage"
            :page-sizes="[100, 200, 300, 400]"
            :page-size="pageSize"
            :total="tableData.length"
            layout="total, sizes, prev, pager, next, jumper"
          >
          </el-pagination>
        </template>
      </div>
    </div>
    <div>
      <div>
        <div class="my-body_left">
          <div>授权方资质(上海广慷医疗器械合伙企业(有限合</div>
          <div style="margin-top: 20px">
            <el-button type="primary" @click="shangchuanzz()" plain
              >上传资质</el-button
            >
            <el-button type="danger" plain>删除资质</el-button>
          </div>
          <template>
            <el-table
              :data="sqflist"
              border
              style="margin-top: 30px"
              :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
            >
              <el-table-column prop="file_name" label="资料名称">
                <!-- <el-button
                  size="mini"
                  @click="handleEdit(scope.$index, scope.row)"
                  >图片</el-button
                > -->
              </el-table-column>
              <el-table-column prop="file_type_txt" label="资料类型">
              </el-table-column>
            </el-table>
          </template>
        </div>
        <el-dialog
          title="添加资质备案文件(企业资质)"
          :visible.sync="tablisty"
          width="30%"
          :before-close="handleClose"
        >
          <el-form ref="form" :model="form" label-width="150px">
            <el-form-item label="文件路径">
              <!-- 	<el-input v-model="form.name" style="width: 200px"></el-input> -->
              <el-upload
                :action="uploadUrl"
                list-type="text"
                :on-success="handleSuccess"
                :on-error="handleError"
              >
                <el-button size="small" type="primary">点击上传</el-button>
              </el-upload>
            </el-form-item>

            <el-form-item label="文件名称">
              <el-input v-model="usernameimg" style="width: 200px"></el-input>
              <el-checkbox
                :indeterminate="isIndeterminate"
                v-model="checkAll"
                @change="handleCheckAllChange"
                >重命名</el-checkbox
              >
            </el-form-item>
            <el-form-item label="文件类型">
              <el-select v-model="usernamelei" placeholder="请选择文件类型">
                <el-option
                  v-for="item in shouquanlei"
                  :key="item.id"
                  :label="item.title"
                  :value="item.id"
                  :disabled="item.disabled"
                >
                </el-option>
              </el-select>
            </el-form-item>

            <el-form-item>
              <el-button type="primary" @click="onSubmitssqf">申请</el-button>
              <el-button @click="quxiaosq">取消</el-button>
            </el-form-item>
          </el-form>
        </el-dialog>
        <div class="my-body_left">
          <div>经销商资质(上海广慷医疗器械合伙企业(有限合</div>
          <div style="margin-top: 20px">
            <el-button type="primary" @click="shangchuanjsq" plain
              >上传资质</el-button
            >
            <el-button type="danger" plain>删除资质</el-button>
          </div>
          <template>
            <el-table
              :data="jxslist"
              border
              style="width: 100%; margin-top: 30px"
              :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
            >
              <el-table-column prop="file_name" label="资料名称">
                <!-- <el-button
                  size="mini"
                  @click="handleEdit(scope.$index, scope.row)"
                  >图片</el-button
                > -->
              </el-table-column>
              <el-table-column prop="file_type_txt" label="资料类型">
              </el-table-column>
            </el-table>
          </template>
        </div>
        <el-dialog
          title="添加资质备案文件(经销商资质)"
          :visible.sync="tablistya"
          width="30%"
          :before-close="handleClose"
        >
          <el-form ref="form" :model="form" label-width="150px">
            <el-form-item label="文件路径">
              <!-- 	<el-input v-model="form.name" style="width: 200px"></el-input> -->
              <el-upload
                :action="uploadUrl"
                list-type="text"
                :on-success="handleSuccess"
                :on-error="handleError"
              >
                <el-button size="small" type="primary">点击上传</el-button>
              </el-upload>
            </el-form-item>

            <el-form-item label="文件名称">
              <el-input v-model="usernameimg" style="width: 200px"></el-input>
              <el-checkbox
                :indeterminate="isIndeterminate"
                v-model="checkAll"
                @change="handleCheckAllChange"
                >重命名</el-checkbox
              >
            </el-form-item>
            <el-form-item label="文件类型">
              <el-select v-model="usernamelei" placeholder="请选择文件类型">
                <el-option
                  v-for="item in shouquanlei"
                  :key="item.id"
                  :label="item.title"
                  :value="item.id"
                  :disabled="item.disabled"
                >
                </el-option>
              </el-select>
            </el-form-item>

            <el-form-item>
              <el-button type="primary" @click="onSubmitsczz">申请</el-button>
              <el-button @click="quxiaosq">取消</el-button>
            </el-form-item>
          </el-form>
        </el-dialog>
        <div class="my-body_left">
          <div>配送方资质(上海广慷医疗器械合伙企业(有限合</div>
          <div style="margin-top: 20px">
            <el-button type="primary" @click="shangchuanpsf" plain
              >上传资质</el-button
            >
            <el-button type="danger" plain>删除资质</el-button>
          </div>
          <template>
            <el-table
              :data="psflist"
              border
              style="width: 100%; margin-top: 30px"
              :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
            >
              <el-table-column prop="file_name" label="资料名称">
                <!-- <el-button
                  size="mini"
                  @click="handleEdit(scope.$index, scope.row)"
                  >图片</el-button
                > -->
              </el-table-column>
              <el-table-column prop="file_type_txt" label="资料类型">
              </el-table-column>
            </el-table>
          </template>
        </div>
        <el-dialog
          title="添加资质备案文件(配送方资质)"
          :visible.sync="tablistyb"
          width="30%"
          :before-close="handleClose"
        >
          <el-form ref="form" :model="form" label-width="150px">
            <el-form-item label="文件路径">
              <!-- 	<el-input v-model="form.name" style="width: 200px"></el-input> -->
              <el-upload
                :action="uploadUrl"
                list-type="text"
                :on-success="handleSuccess"
                :on-error="handleError"
              >
                <el-button size="small" type="primary">点击上传</el-button>
              </el-upload>
            </el-form-item>

            <el-form-item label="文件名称">
              <el-input v-model="usernameimg" style="width: 200px"></el-input>
              <el-checkbox
                :indeterminate="isIndeterminate"
                v-model="checkAll"
                @change="handleCheckAllChange"
                >重命名</el-checkbox
              >
            </el-form-item>
            <el-form-item label="文件类型">
              <el-select v-model="usernamelei" placeholder="请选择文件类型">
                <el-option
                  v-for="item in shouquanlei"
                  :key="item.id"
                  :label="item.title"
                  :value="item.id"
                  :disabled="item.disabled"
                >
                </el-option>
              </el-select>
            </el-form-item>

            <el-form-item>
              <el-button type="primary" @click="onSubmitpsf">申请</el-button>
              <el-button @click="quxiaosq">取消</el-button>
            </el-form-item>
          </el-form>
        </el-dialog>
      </div>
    </div>
  </div>
</template>

<script>
import { getData, postData } from "@/utils/request.js";
import { validEmail } from "@/utils/validate";
import { string } from "clipboard";
export default {
  data() {
    return {
      // customHeaders: {
      // 	'Authorization': 'Bearer your-token'
      // },
      // additionalData: {
      // 	// 这里可以添加你需要传递的参数
      // 	token: localStorage.getItem("token"),

      // },
      input: "",
      area: false,
      areabg: false,
      tablisty: false,
      tablistya: false,
      tablistyb: false,
      usernameimg: "",
      key: 1, // 为了能每次切换权限的时候重新初始化指令
      options: [
        {
          value: "1",
          label: "全部",
        },
        {
          value: "2",
          label: "一般订单",
        },
        {
          value: "3",
          label: "积分订单",
        },
        {
          value: "3",
          label: "样品订单",
        },
        {
          value: "3",
          label: "换货订单",
        },
      ],
      value1: "",
      value2: "",
      value3: "",
      form: {
        id: "",
        jxs_code: "",
        sqf_code: "",
        psf_code: "",
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        sq_year_num: "",
        sq_type: "1",
        jxs_id: "",
        sqf_id: "",
        psf_id: "",
        hospital_id: "",
        hospital_code: "",
        product_type_ids: "",
        reason_id: "",
        area_id: "",
        area_code: "",
        sc_target_num: "",
        remark: "",
        zr_target_num: "",
        reason_remark: "",
        productids: "",
      },
      checkAll: false,
      checked: true,
      disabledis: true,
      radio: "1",
      value: "",
      tableData: [],
      checkAlla: false,
      checkedCities: [],
      cities: [],
      isIndeterminate: true,
      sq_company_year: [],
      company_list: [],
      areaslist: [],
      product_type: [],
      listtyp: [],
      sq_company_reason: [],
      hospital_list: [],
      bgform: {
        token: localStorage.getItem("token"),
        id: "",
        jxs_code: "",
        sqf_code: "",
        psf_code: "",
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        sq_year_num: "",
        sq_type: "1",
        jxs_id: "",
        sqf_id: "",
        psf_id: "",
        hospital_id: "",
        hospital_code: "",
        product_type_ids: "",
        reason_id: "",
        area_id: "",
        area_code: "",
        sc_target_num: "",
        remark: "",
        zr_target_num: "",
        reason_remark: "",
        productids: "",
        jingxiaoshangkust: "", //选中的经销商信息
        shouquanfkust: "", //选中的授权方信息
        peisongfangkust: "", //选中的配送方信息
        yiyuankust: "", //选中的授权医院
        dizhikust: "", //选中的授权地区
      },
      exchange_info: "",
      exchange_infojfe: "",
      fileList: [],
      uploadUrl: "http://192.168.3.184:8093/api/index/uploadFile",
      shouquanlei: [],
      usernameimg: "",
      usernamelei: "",
      currentRow: null,
      start_time: "",
      url: "",
      jxslist: [],
      psflist: [],
      sqflist: [],
      total: "",
      pageSize: 100,
      currentPage: 1,
      rizhixinxi: false,
      areabj: false,
      xinxilist: [],
      jingxiaoshangkust: "", //选中的经销商信息
      shouquanfkust: "", //选中的授权方信息
      peisongfangkust: "", //选中的配送方信息
      yiyuankust: "", //选中的授权医院
      dizhikust: "", //选中的授权地区
      shenqing: "申请",
      exchange_option: [],
      sousuolist: [],
      shouquanfang:"",
      jxshang:"",
      sqendate:"",
      sousstatus:"",
      hospitalname:"",
    };
  },
  created() {
    this.jinxiaoshanglist();
    this.canshulist();
    this.shangcahun();
    this.lastDayOfYear();
    this.lieinput();
  },

  methods: {
    //列表参数
    lieinput() {
      var data = {
        token: localStorage.getItem("token"),
      };
      postData("company.empower/getlist_params", data).then((res) => {
        console.log(res, 888888888888888888);
        this.sousuolist = res.data.statuslist;
      });
    },
    jinhuoe() {
      var listpids = this.exchange_info.join(",");
      this.exchange_infojfe = listpids;
      console.log(listpids);
    },
    xinzeng() {
      this.area = true;
      this.shenqing = "申请";
      var data = {
        jxs_code: "",
        sqf_code: "",
        psf_code: "",
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        sq_year_num: "",
        sq_type: "1",
        jxs_id: "",
        sqf_id: "",
        psf_id: "",
        hospital_id: "",
        hospital_code: "",
        product_type_ids: "",
        reason_id: "",
        area_id: "",
        area_code: "",
        sc_target_num: "",
        remark: "",
        zr_target_num: "",
        reason_remark: "",
        productids: "",
        productidsname: "",
        id: "",
      };
      this.form = data;
    },
    //变更
    handleEditbg(index, items) {
      this.form.id = items.id;
      console.log(this.form.id);

      var dataxq = {
        id: items.id,
        token: localStorage.getItem("token"),
      };
      postData("company.empower/empowerInfo", dataxq).then((res) => {
        console.log(res);
        var item = res.data;
        var data = {
          id: item.id,
          jxs_code: item.jxs_code,
          sqf_code: item.sqf_code,
          psf_code: item.psf_code,
          name: item.name,
          region: item.region,
          date1: "",
          date2: "",
          delivery: false,
          type: [],
          sq_start_date: item.sq_start_date,
          sq_end_date: item.sq_end_date,
          resource: item.resource,
          desc: item.desc,
          sq_year_num: JSON.stringify(item.sq_year_num),
          sq_type: item.sq_type,
          jxs_id: item.jxs_id,
          sqf_id: item.sqf_id,
          psf_id: item.psf_id,
          hospital_id: item.hospital_id,
          hospital_code: item.hospital_code,
          product_type_ids: item.product_type_ids,
          reason_id: JSON.stringify(item.reason_id),
          area_id: item.area_id,
          area_code: item.area_code,
          sc_target_num: item.sc_target_num,
          remark: item.remark,
          zr_target_num: item.zr_target_num,
          reason_remark: item.reason_remark,
          productids: item.product_type_pids.split(",").map(Number),
          jingxiaoshangkust: item.jxs_name,
          peisongfangkust: item.psf_name,
          shouquanfkust: item.sqf_name,
          yiyuankust: item.hospital_name,
        };
        console.log(item);
        this.checkedCities = item.product_type_ids.split(",").map(Number);
        this.handleSelectionChange(data.productids);

        this.radio = item.sq_type;

        this.bgform = data;
      });
    },

    //编辑
    handleEditbj(index, items) {
      this.form.id = items.id;
      console.log(this.form.id);
      this.shenqing = "修改申请";
      this.area = true;

      var dataxq = {
        id: items.id,
        token: localStorage.getItem("token"),
      };
      postData("company.empower/empowerInfo", dataxq).then((res) => {
        console.log(res);
        var item = res.data;
        var data = {
          id: item.id,
          jxs_code: item.jxs_code,
          sqf_code: item.sqf_code,
          psf_code: item.psf_code,
          name: item.name,
          region: item.region,
          date1: "",
          date2: "",
          delivery: false,
          type: [],
          sq_start_date: item.sq_start_date,
          sq_end_date: item.sq_end_date,
          resource: item.resource,
          desc: item.desc,
          sq_year_num: JSON.stringify(item.sq_year_num),
          sq_type: item.sq_type,
          jxs_id: item.jxs_id,
          sqf_id: item.sqf_id,
          psf_id: item.psf_id,
          hospital_id: item.hospital_id,
          hospital_code: item.hospital_code,
          product_type_ids: item.product_type_ids,
          reason_id: JSON.stringify(item.reason_id),
          area_id: item.area_id,
          area_code: item.area_code,
          sc_target_num: item.sc_target_num,
          remark: item.remark,
          zr_target_num: item.zr_target_num,
          reason_remark: item.reason_remark,
          productids: item.product_type_pids.split(",").map(Number),
        };
        console.log(item);
        this.checkedCities = item.product_type_ids.split(",").map(Number);
        this.handleSelectionChange(data.productids);
        (this.yiyuankust = item.hospital_name), (this.radio = item.sq_type);
        this.jingxiaoshangkust = item.jxs_name;
        this.peisongfangkust = item.psf_name;
        this.shouquanfkust = item.sqf_name;
        this.form = data;
      });
    },
    handleEdit(index, item) {
      this.rizhixinxi = true;
      this.xinxilist = [];
      var data = {
        id: item.id,
        token: localStorage.getItem("token"),
      };
      postData("company.empower/getloglist", data).then((res) => {
        console.log(res);
        this.xinxilist = res.data;
      });
    },
    handleSizeChange(val) {
      this.pageSize = val;
      this.jinxiaoshanglist();
    },
    //经销商默认第一条
    setCurrent() {
      this.$refs.singleTable.setCurrentRow(this.tableData[0]);
    },
    //默认选中第一条
    handleCurrentChangelist(val) {
      this.currentPage = val;

      this.jinxiaoshanglist();
    },
    currentDate() {
      let currentDate = new Date();
      let year = currentDate.getFullYear();
      let month = currentDate.getMonth() + 1; // 注意月份从0开始，需要加1
      let day = currentDate.getDate();
      this.form.sq_start_date = year + "-" + month + "-" + day;
      console.log(this.form.sq_end_date);
    },
    lastDayOfYear() {
      const now = new Date();
      const year = now.getFullYear();
      const lastDayOfYear = new Date(year, 11, 32);
      this.form.sq_end_date = lastDayOfYear.toISOString().split("T")[0];
    },
    change(val) {
      console.log(val);
      if (val == 1) {
        const now = new Date();
        const year = now.getFullYear();
        const lastDayOfYear = new Date(year, 11, 31);

        this.form.sq_end_date = lastDayOfYear.toISOString().split("T")[0];
      } else if (val == 2) {
        const now = new Date();
        const year = now.getFullYear();
        const lastDayOfYear = new Date(year, 11, 32);
        const yearInMs = 365 * 24 * 60 * 60 * 1000; // 假设一年365天
        const twodate = new Date(lastDayOfYear.getTime() + yearInMs);
        this.form.sq_end_date = twodate.toISOString().split("T")[0];
      } else if (val == 3) {
        const now = new Date();
        const year = now.getFullYear();
        const lastDayOfYear = new Date(year, 11, 32);
        const yearInMs = 365 * 24 * 60 * 60 * 1000 * 2; // 假设一年365天
        const twodate = new Date(lastDayOfYear.getTime() + yearInMs);
        this.form.sq_end_date = twodate.toISOString().split("T")[0];
      }
    },
    handleCurrentChange(val) {
      console.log(val);
      console.log(val);
      this.radio = val.sq_type;

      // this.bgform = val;

      // this.bgform.productids = val.product_type_pids.split(',').map(Number)

      this.currentRow = val;
      this.jxs();
    },

    shangchuanjsq() {
      if (this.bgform == "") {
        this.$message({
          message: "请选择一条数据哦",
          type: "warning",
        });
      } else {
        this.usernameimg = "";
        this.tablistya = true;
      }
    },
    shangchuanpsf() {
      if (this.bgform == "") {
        this.$message({
          message: "请选择一条数据哦",
          type: "warning",
        });
      } else {
        this.usernameimg = "";
        this.tablistyb = true;
      }
    },
    shangchuanzz() {
      this.usernameimg = "";
      if (this.bgform == "") {
        this.$message({
          message: "请选择一条数据哦",
          type: "warning",
        });
      } else {
        this.tablisty = true;
      }
    },
    getCurrentDateTime() {
      const now = new Date();
      const year = now.getFullYear();
      const month = this.padNumber(now.getMonth() + 1); // 月份是从0开始的
      const day = this.padNumber(now.getDate());
      const hours = this.padNumber(now.getHours());
      const minutes = this.padNumber(now.getMinutes());
      const seconds = this.padNumber(now.getSeconds());
      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },
    padNumber(num) {
      return num < 10 ? "0" + num : num;
    },
    onSubmitssqf() {
      var data = {
        type: 2,
        token: localStorage.getItem("token"),
        belong_id: this.bgform.sqf_id,
        file_name: this.usernameimg,
        file_type: this.usernamelei,
        url: this.url,
      };
      postData("index/addFile", data).then((res) => {
        console.log(res);
      });
    },
    onSubmitpsf() {
      var data = {
        type: 2,
        token: localStorage.getItem("token"),
        belong_id: this.bgform.psf_id,
        file_name: this.usernameimg,
        file_type: this.usernamelei,
        url: this.url,
        // start_time:this.start_time,
        // end_time:this.end_time,
      };
      postData("index/addFile", data).then((res) => {
        console.log(res);
      });
    },

    onSubmitsczz() {
      this.start_time = this.getCurrentDateTime();
      console.log(this.start_time);
      var data = {
        type: 2,
        token: localStorage.getItem("token"),
        belong_id: this.bgform.jxs_id,
        file_name: this.usernameimg,
        file_type: this.usernamelei,
        url: this.url,
        // start_time:this.start_time,
        // end_time:this.end_time,
      };
      postData("index/addFile", data).then((res) => {
        console.log(res);
      });
    },
    handleSuccess(response, file, fileList) {
      console.log("文件上传成功", file);

      this.usernameimg = this.shouquanlei[this.usernamelei].title + ".png";
      this.url = response.data.file;
    },
    handleError(err, file, fileList) {
      console.error("文件上传失败", err, file, fileList);
    },
    jxs() {
      var data = {
        jxs_id: this.bgform.jxs_id,
        psf_id: this.bgform.psf_id,
        sqf_id: this.bgform.sqf_id,
        token: localStorage.getItem("token"),
      };
      postData("company.empower/getcompanyFileList", data).then((res) => {
        console.log(res.data);
        this.jxslist = res.data.jxs;
        this.psflist = res.data.psf;
        this.sqflist = res.data.sqf;
      });
    },

    shangcahun() {
      var data = {
        type: 2,
        token: localStorage.getItem("token"),
      };
      postData("index/fileParams", data).then((res) => {
        // 处理响应数据

        this.shouquanlei = res.data.file_type;
        this.usernamelei = res.data.file_type[1].id;

        console.log(this.shouquanlei);
      });
    },
    areabgbtn() {
      this.areabg = true;
      this.handleEditbg(0, this.currentRow);
    },
    handleClose() {
      this.areabg = false;
      this.area = false;
      this.areabj = false;
      this.tablisty = false;
      this.tablistya = false;
      this.tablistyb = false;
      this.rizhixinxi = false;
    },
    onSubmit() {},
    selectChange(val) {
      console.log(val);
      this.form.sqf_code = val;
    },
    handleSelectionChange(val) {
      var listpids = val.join(",");
      console.log("选中改变的值：", listpids);
      this.checkAlla = false;
      var data = {
        pids: listpids,
        token: localStorage.getItem("token"),
      };
      postData("company.empower/getproductSon", data).then((res) => {
        // 处理响应数据
        if (res.code == 0) {
          console.log(res, 66666);
          this.listtyp = res.data;
          this.cities = res.data;
        } else {
        }
      });
    },
    handleSelectChange(value) {
      this.checkedCities = [];
      var listpids = value.join(",");
      console.log("选中改变的值：", listpids);
      this.checkAlla = false;
      var data = {
        pids: listpids,
        token: localStorage.getItem("token"),
      };
      postData("company.empower/getproductSon", data).then((res) => {
        // 处理响应数据
        if (res.code == 0) {
          console.log(res, 66666);
          this.listtyp = res.data;
          this.cities = res.data;
        } else {
        }
      });
    },
    onSubmitshouquan() {
      if (this.form.id == "") {
        var data = {
          jxs_id: this.form.jxs_id,
          sqf_id: this.form.sqf_id,
          psf_id: this.form.psf_id,
          sq_type: this.radio,
          hospital_id: this.form.hospital_id,
          area_id: this.form.area_id,
          sq_year_num: this.form.sq_year_num,
          sq_start_date: this.form.sq_start_date,
          sq_end_date: this.form.sq_end_date,
          product_type_ids: this.form.product_type_ids,
          reason_id: this.form.reason_id,
          remark: this.form.remark,
          zr_target_num: this.form.zr_target_num,
          sc_target_num: this.form.sc_target_num,
          reason_remark: this.form.reason_remark,
          token: localStorage.getItem("token"),
        };
      } else {
        var data = {
          id: this.form.id,
          jxs_id: this.form.jxs_id,
          sqf_id: this.form.sqf_id,
          psf_id: this.form.psf_id,
          sq_type: this.radio,
          hospital_id: this.form.hospital_id,
          area_id: this.form.area_id,
          sq_year_num: this.form.sq_year_num,
          sq_start_date: this.form.sq_start_date,
          sq_end_date: this.form.sq_end_date,
          product_type_ids: this.form.product_type_ids,
          reason_id: this.form.reason_id,
          remark: this.form.remark,
          zr_target_num: this.form.zr_target_num,
          sc_target_num: this.form.sc_target_num,
          reason_remark: this.form.reason_remark,
          token: localStorage.getItem("token"),
        };
      }
      console.log(this.form.id);
      console.log(data);
      postData("company.empower/operation", data).then((res) => {
        // 处理响应数据
        if (res.code == 0) {
          this.$message({
            message: "添加成功",
            type: "success",
          });
          this.area = false;
          this.jinxiaoshanglist();
        } else {
          console.log(res, 66666);
          this.$message.error(res.msg);
        }
      });
    },
    onSubmitbiangeng() {
      var data = {
        id: this.bgform.id,
        jxs_id: this.bgform.jxs_id,
        sqf_id: this.bgform.sqf_id,
        psf_id: this.bgform.psf_id,

        sq_start_date: this.bgform.sq_start_date,
        reason_id: this.bgform.reason_id,
        remark: this.bgform.remark,
        zr_target_num: this.bgform.zr_target_num,
        sc_target_num: this.bgform.sc_target_num,
        is_exchange: 0,
        exchange_info: this.exchange_infojfe,
        token: localStorage.getItem("token"),
      };

      postData("company.empower/empowerExchange", data).then((res) => {
        // 处理响应数据
        if (res.code == 0) {
          console.log(res, 66666);
          this.$message({
            message: "变更成功",
            type: "success",
          });
          this.jinxiaoshanglist();
        } else {
          this.$message.error(res.msg);
        }
      });
    },
    quxiaosq() {
      this.$message({
        type: "info",
        message: "已取消",
      });
      this.tablisty = false;
      this.tablistya = false;
      this.tablistyb = false;
      this.area = false;
      this.areabj = false;
    },
    quxiaosqbg() {
      this.$message({
        type: "info",
        message: "已取消",
      });
      this.areabg = false;
    },
    changedj(val) {
      this.form.jxs_code = val.company_code;
      this.form.jxs_id = val.id;
      this.form.type = 1;
      if ((this.disabledis = true)) {
        this.shouquanfkust = this.jingxiaoshangkust;
        this.peisongfangkust = this.jingxiaoshangkust;
        this.form.sqf_code = val.company_code;
        this.form.psf_code = val.company_code;
        this.form.sqf_id = val.id;
        this.form.psf_id = val.id;
        this.form.jxs_id = vval.id;
      } else {
      }
      console.log(val);
    },

    //变更
    changedjbg(val) {
      this.bgform.jxs_code = val.company_code;
      this.bgform.jxs_id = val.id;
      this.bgform.type = 1;
      if ((this.disabledis = true)) {
        this.bgform.shouquanfkust = this.bgform.jingxiaoshangkust;
        this.bgform.peisongfangkust = this.bgform.jingxiaoshangkust;
        this.bgform.sqf_code = val.company_code;
        this.bgform.psf_code = val.company_code;
        this.bgform.sqf_id = val.id;
        this.bgform.psf_id = val.id;
        this.bgform.jxs_id = vval.id;
      } else {
      }
      console.log(val);
    },

    //变更授权方
    changesqbg(val) {
      this.bgform.sqf_code = val.company_code;
      this.bgform.sqf_id = val.id;
      this.bgform.type = 1;

      console.log(val);
    },
    //变更配送方
    changepsfbg(val) {
      this.bgform.psf_code = val.company_code;
      this.bgform.psf_id = val.id;
      this.bgform.type = 1;
    },
    //变更医院
    changepyiybg(val) {
      console.log(val);
      this.bgform.hospital_code = val.hospital_code;
      this.bgform.hospital_id = val.id;
    },
    //变更地址
    changedhzbg(val) {
      console.log(val);
      this.bgform.area_code = val.dms_city_code;
      this.bgform.area_id = val.id;
    },
    //申请授权方
    changesq(val) {
      this.form.sqf_code = val.company_code;
      this.form.sqf_id = val.id;
      this.form.type = 1;

      console.log(val);
    },
    //申请配送方
    changepsf(val) {
      this.form.psf_code = val.company_code;
      this.form.psf_id = val.id;
      this.form.type = 1;
    },
    //申请医院
    changepyiy(val) {
      console.log(val);
      this.form.hospital_code = val.hospital_code;
      this.form.hospital_id = val.id;
    },
    //申请地址
    changedhz(val) {
      console.log(val);
      this.form.area_code = val.dms_city_code;
      this.form.area_id = val.id;
    },
    jinxiaoshanglist() {
      var name =  {
          "d.name|like":this.shouquanfang,
          "e.name|like":this.jxshang,
          "f.name|=":"",
          "a.sq_end_date|>=":this.sqendate,
          "a.status|no":this.sousstatus,
          "a.hospital_area_name|no":this.hospitalname
        }
      var data = {
       
        page: this.currentPage,
        limit: this.pageSize,
        token: localStorage.getItem("token"),
        search_key: JSON.stringify(name) ,
       
      };
      postData("company.empower/indexlist", data).then((res) => {
        // 处理响应数据
        if (res.code == 0) {
          console.log(res);

          this.tableData = res.data.data;
          this.total = res.data.total;
          this.setCurrent();
        } else {
        }
      });
    },
    canshulist() {
      var data = {
        token: localStorage.getItem("token"),
      };
      postData("company.empower/getParams", data).then((res) => {
        // 处理响应数据
        if (res.code == 0) {
          this.sq_company_year = res.data.sq_company_year;
          this.company_list = res.data.company_list;
          this.areaslist = res.data.areaslist;
          this.product_type = res.data.product_type;
          this.sq_company_reason = res.data.sq_company_reason;
          this.hospital_list = res.data.hospital_list;
          this.exchange_option = res.data.exchange_option;
        } else {
        }
      });
    },

    handleClick(row) {
      console.log(row);
    },
    handleCheckAllChange(val) {
      this.checkedCities = val ? this.listtyp : [];
      this.isIndeterminate = false;
      console.log(this.checkedCities);
    },
    handleChange(value) {
      console.log(value);
      let checkedCount = value.length;
      this.checkAlla = checkedCount === this.cities.length;
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.cities.length;
      this.form.product_type_ids = value.join(",");
    },

    handleCheckedCitiesChange(val) {
      if (val == true) {
        this.disabledis = true;
        this.shouquanfkust = this.jingxiaoshangkust;
        this.peisongfangkust = this.jingxiaoshangkust;
        this.form.sqf_code = this.form.jxs_code;
        this.form.psf_code = this.form.jxs_code;
        this.form.sqf_id = this.form.jxs_id;
        this.form.psf_id = this.form.jxs_id;
        this.form.jxs_id = this.form.jxs_id;
      } else {
        this.disabledis = false;
      }
      //   let checkedCount = value.length;
      //   this.checkAll = checkedCount === this.cities.length;
      //   this.isIndeterminate =
      //     checkedCount > 0 && checkedCount < this.cities.length;
    },
  },
};
</script>

<style lang="scss" scoped>
.ipt_a {
  width: 240px;
  height: 50px;
  float: left;
}

.ipt_b {
  width: 450px;
  height: 50px;
  float: left;
}
</style>